<?php

/**
 * Dossier form.
 *
 * @package    smp-crm
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class DossierForm extends BaseDossierForm
{
  public function configure()
  {
      unset($this['juridiction_id'], $this['created_at'], $this['updated_at']);
      $this->widgetSchema['categorie_affaire'] = new sfWidgetFormChoice(array('choices' => JuridictionTable::$type, 'expanded' => false, 'multiple' => false));
      $this->widgetSchema['nature'] = new sfWidgetFormChoice(array('choices' => DossierTable::$natures, 'expanded' => false, 'multiple' => false));

      if( $this->isNew() ){
        $this->setDefault('numero_devis', DossierTable::generateDevis());  
      }
  }
}
